home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / applic / ncsa / Mac / Telnet2.6 / prerelease / d3 / Telnet2.6.1d3.src.sit.hqx / Telnet 2.6.1d3 source / source / vs / wind.h < prev   
Encoding:
C/C++ Source or Header  |  1994-06-27  |  4.8 KB  |  140 lines

  1. /*
  2.  *        MacLook Window Management Data Structure Definition
  3.  */
  4.  
  5. #define MAXFTP    128            /* BYU mod */
  6. #define    MAXKB    256            /* BYU mod */
  7.  
  8. #define TYPE_I_ON_CLOSE    1    /* BYU mod */
  9. #define CAPTURE_DATA    2    /* BYU mod */
  10. #define MGET_STATE        4    /* BYU LSC */
  11. #define MPUT_STATE        8    /* BYU LSC */
  12. #define PASTE_IN_PROGRESS    0x4000 /* BYU LSC */
  13.  
  14. //    The following are for the "active" field.
  15. #define    CNXN_NOTINUSE    -2
  16. #define    CNXN_DNRWAIT    -1
  17. #define    CNXN_ACTIVE         0
  18. #define    CNXN_OPENING     1
  19. #define    CNXN_ISCORPSE     2
  20. #define MHOPTS_BASE        37    // Base option for {my,his}opts (Authenticate)
  21.                             //  {my,his} opts should only be used for telnet options
  22.                             //  in the range starting at MHOPTS_BASE and limited
  23.                             //  by MHOPTS_SIZE. This saves memory.
  24. #define MHOPTS_SIZE        2    // Number of options supported in {my,his}opts
  25.  
  26. #define SLC_ARRAY_SIZE    18    // This should match the value of SLC_MAX from parse.h
  27.  
  28. struct WindRec {
  29. short    
  30.     vs,                /* virtual screen number */                    /* BYU 2.4.15 */
  31.     port,            /* TCP/IP port number */
  32.     active,            /* See above for definition of possible values */
  33.     enabled,        /* Are we currently enabled for receive? */
  34.  
  35.     vtemulation,    /* 0 = VT100, 1 = VT 220 */
  36.     bsdel,            /* backspace or delete is default */
  37.     eightbit,        /* eight bit font displayed (false is seven bit display */    /* BYU 2.4.9 */
  38.     national,        /* LU/MP: translation table to use for this connection */
  39.     arrowmap,        /* MAT: should we allow the arrow keys to be mapped?? */
  40.     showErrors,        /* show ALL errors if this is set */
  41.     pgupdwn,        /* JMB/MAT: should we have page up/down do local window movement? */
  42.     emacsmeta,        /* JMB/SMB:    should option key work as EMACS meta key? */
  43.     Xterm,            /* JMB/WNR:    should Xterm sequences be recognized? */
  44.     halfdup,        /* If true then half-duplex mode */
  45.     forcesave,        /* NCSA 2.5: force lines to be saved */
  46.     crmap,            /* BYU mod - CR's second byte is ... */
  47.  
  48.     tekclear,        /* Does tektronix (1) clear screen or (0) add window */
  49.     tektype,        /* -1 = TEK not allowed, 0 = 4014, 1 = 4105 */
  50.     curgraph,        /* Associated Tek drawing */
  51.  
  52.     maxscroll,        /* Requested amount of scroll back */
  53.     width,            /* Width we started with */
  54.     wrap,            /* whether vtwrap is set or not for this screen */
  55.     echo,            /* NOTE: this is backwards - I am echoing your chars */
  56.     ESscroll,        /* will Clear Screen Save Lines? */
  57.     termstate,        /* Emulation State (-1 is none, 0 is VT100) */
  58.                     /* = TEKTYPE, send data to VGwrite */
  59.                     /* = RASTYPE, send data to VRwrite */
  60.  
  61.     naws,            /* NCSA: will negotiate NAWS */
  62.     lineAllow,        /* allow linemode? */
  63.     Isga,            /* I am supressing go ahead */
  64.     Usga,            /* You are supressing go ahead */
  65.     Ittype,            /* I am sending terminal type negotiations.. */
  66.     telstate,        /* Telnet State */
  67.     timing,            /* True if waiting for timing mark */
  68.     substat,        /* Telnet Subnegot. State */
  69.     parseIndex,        /* save an index into the subnegotiation parsed data */
  70.  
  71.     portNum,        /* port number from the application save set */
  72.     ftpport,        /* BYU mod - FTP port number */
  73.     ftpstate,        /* BYU mod - Telnet session = 0, Ftp session != 0 */
  74.     ftpnext,        /* BYU mod - Next ftpstate after waiting for response from "PORT" */
  75.     xfer,            /* File X-fer status */
  76.     kblen,            /* Pointer to next char in buffer to be used */
  77.     capturesize,    /* BYU mod - ftp client size of captured data */
  78.     clientflags;    /* BYU mod - boolean flags for ftp client */
  79.  
  80. Str63
  81.     machine;        // Name of machine we are connecting to
  82.  
  83. Str32
  84.     answerback;        /* Message to send when server sends TERMTYPE Telnet option */
  85.  
  86. /*     The following are used during paste operations */
  87. short
  88.     outlen,            /* Length of text remaining to be pasted */
  89.     pastemethod,    /* 1 = All at once, 0 = in blocks of size pasteblock */
  90.     pastesize;        /* Size of paste "blocks" */
  91.     
  92. char
  93.     *outptr,        /* Pointer to next char to send */
  94.     **outhand;        /* Handle to text from the Paste */
  95.  
  96. long   
  97.     incount,        /* BYU LSC - Count of bytes into this port */
  98.     outcount;        /* BYU LSC - Count of bytes out this port */
  99. /* ---- */
  100.  
  101. short
  102.     rows,            /* handshaking */
  103.     col,
  104.     lmode,            /* Current linemode MODE.  Currently support EDIT and TRAPSIG */
  105.     slc[SLC_ARRAY_SIZE+1];
  106.     
  107. char
  108.     TELstop,        /* Character for scrolling to stop */
  109.     TELgo,            /* Character for scrolling to go */
  110.     TELip,            /* Character for interrupt process */
  111.     ftpbuf[MAXFTP],    /* BYU mod - Outgoing ftp commands buffer */
  112.     kbbuf[MAXKB];    /* The keyboard buffer (echo mode ) */
  113.     
  114. GrafPtr 
  115.     wind;
  116.     
  117. Handle
  118.     myInitParams;    //    So we can look up stuff after we have DNS'd.
  119.  
  120. Ptr
  121.     aedata;
  122.  
  123. unsigned char
  124.     myopts[MHOPTS_SIZE],    // My telnet options. Warning: see MHOPTS_BASE
  125.     hisopts[MHOPTS_SIZE],    // His telnet options. Warning: see MHOPTS_BASE
  126.     parsedat[450];            // save the subnegotiation data here
  127.                             //   must be big enough for a Kerberos AP message
  128.  
  129. char
  130.     cannon[80];        // Cannonical hostname
  131.  
  132. Boolean
  133.     authenticate,    // true if authenticating connection wanted
  134.     encrypt;        // true if encrypting connection wanted
  135.  
  136. };
  137.  
  138. typedef struct WindRec WindRec;
  139.  
  140.